﻿//card class
/*
Mouseover goes up
Mouseoff goes down
Click goes up/down and stays
Click drag to move
*/
package
{
	import flash.display.*;
	
	 public class Card extends MovieClip
	 {
		 private var card:String;
		 private var xPos:Number;
		 private var yPos:Number;
		 private var isShowing:Boolean;
		 private var held:Boolean;
		 
		//constructor
		public function Card()
		{
			this.card = "Ace_Clubs";
			this.xPos = this.x;
			this.yPos = this.y;
			this.isShowing = true;
			this.held = false;
			
		}
		
		 public function getCard():String
		 {
			return this.card; 
		 }
		 public function setCard(c:String)
		 {
			card = c; 
		 }
		 public function setY(why:Number)
		 {
			this.yPos += why;
		 }
		  public function getY():Number
		 {
			return this.yPos;
		 }
		 public function hold()
		 {
			// this.y = 200;
			 if(this.held == false)
			 {
				this.held = true;
				this.y = 200
			 }
			 else
			 {
				this.held = false;
				this.y = 220;
			 }
		 }
		 public function getHeld():Boolean
		 {
			 return this.held;
		 }
		 
	 }	
	
	
}